#!/sbin/openrc-run
# Copyright 2020-2021 Laurent Bercot for Alpine Linux
# Distributed under the terms of the ISC License.
#

name=dnsfunnel
description="local DNS cache daemon"
command=dnsfunneld
command_args="-v2 -u `id -u dnsfunnel` -g `id -g dnsfunnel` -xn"
command_background=true
directory=/run/dnsfunnel/root
pidfile=/run/dnsfunnel/dnsfunnel.pid

start_pre() {
	mkdir -p -m 0755 /run/dnsfunnel/root
	dnsfunnel-translate
}
